import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '../views/Index.vue'
import Search from '../views/Search.vue'
import Item from '../views/Item.vue'
import seckill from '../views/seckill.vue'
import cart from '../views/cart.vue'

Vue.use(VueRouter)

const routes = [
  { path: '/', redirect: '/index' },
  { path: '/index', component: Index },
  { path: '/search', component: Search },
  { path: '/item', component: Item },
  { path: '/seckill', component: seckill },
  { path: '/cart', component: cart }
]

const router = new VueRouter({
  routes: routes
})

export default router
